package com.xin.data.simbapesa.dialog;

import android.content.Context;
import android.view.LayoutInflater;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.xin.data.simbapesa.base.BaseDialog;
import com.xin.data.simbapesa.databinding.SimbaLimitBinding;
import com.xin.data.simbapesa.utils.ViewUtils;

public class LimitDialog extends BaseDialog<SimbaLimitBinding> {



    public LimitDialog(@NonNull Context context) {
        super(context);
    }

    public LimitDialog(@NonNull Context context, int themeResId) {
        super(context, themeResId);
    }

    protected LimitDialog(@NonNull Context context, boolean cancelable, @Nullable OnCancelListener cancelListener) {
        super(context, cancelable, cancelListener);
    }

    @Override
    protected SimbaLimitBinding initViewBinding(LayoutInflater inflater) {
        return SimbaLimitBinding.inflate(inflater);
    }


    @Override
    protected void initView() {
        binding.tvColse.setOnClickListener(v -> {
            ViewUtils.viewScale(v);
            dismiss();
        });
        binding.tvBtn.setOnClickListener(v -> {
            ViewUtils.viewScale(v);
            if (onBtnClickListener != null) {
                onBtnClickListener.btnOnClickOk();
            }
            dismiss();
        });
    }


    public void setData(String name, String amout1, String amout2) {
        binding.tvName.setText(name);
        binding.tvAmout1.setText(amout1);
        binding.tvAmout2.setText(amout2);
    }



}
